<!DOCTYPE html>
<html>
<head>
    <title>Unittest Results</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body>
    <div class="container">
        <div class="row">
            <div class="col-xs-12">
                <h2 class="text-capitalize">Unittest Results</h2>
                <p class='attribute'><strong>Start Time: </strong>2019-04-16 12:05:38</p>
                <p class='attribute'><strong>Duration: </strong>0 ms</p>
                <p class='attribute'><strong>Summary: </strong>Total: 4, Pass: 1, Fail: 1, Error: 1, Skip: 1</p>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-10 col-md-10">
                <table class='table table-hover table-responsive'>
                    <thead>
                        <tr>
                            <th>__main__.TestStringMethods</th>
                            <th>Status</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class='warning'>
                            <td class="col-xs-10">test_error</td>
                            <td class="col-xs-1">
                                <span class="label label-warning" style="display:block;width:40px;">Error</span>
                            </td>
                            <td class="col-xs-1">
                                <button class="btn btn-default btn-xs">View</button>
                            </td>
                        </tr>
                        <tr style="display:none;">
                            <td class="col-xs-9" colspan="3"><p style="color:maroon;">ValueError: </p><p style="color:maroon;">Traceback (most recent call last):
  File "e:/PythonData/Selenium/pom/src/report/test_HTMLTestRunner.py", line 12, in test_error
    raise ValueError
ValueError
</p>
                            </td>
                        </tr>
                        <tr class='danger'>
                            <td class="col-xs-10">test_fail</td>
                            <td class="col-xs-1">
                                <span class="label label-danger" style="display:block;width:40px;">Fail</span>
                            </td>
                            <td class="col-xs-1">
                                <button class="btn btn-default btn-xs">View</button>
                            </td>
                        </tr>
                        <tr style="display:none;">
                            <td class="col-xs-9" colspan="3"><p style="color:maroon;">AssertionError: 1 != 2</p><p style="color:maroon;">Traceback (most recent call last):
  File "e:/PythonData/Selenium/pom/src/report/test_HTMLTestRunner.py", line 16, in test_fail
    self.assertEqual(1, 2)
AssertionError: 1 != 2
</p>
                            </td>
                        </tr>
                        <tr class='info'>
                            <td class="col-xs-10">test_skip</td>
                            <td class="col-xs-1">
                                <span class="label label-info" style="display:block;width:40px;">Skip</span>
                            </td>
                            <td class="col-xs-1">
                                <button class="btn btn-default btn-xs">View</button>
                            </td>
                        </tr>
                        <tr style="display:none;">
                            <td class="col-xs-9" colspan="3"><p style="color:maroon;">This is a skipped test.</p>
                            </td>
                        </tr>
                        <tr class='success'>
                            <td class="col-xs-10">test_upper</td>
                            <td class="col-xs-1">
                                <span class="label label-success" style="display:block;width:40px;">Pass</span>
                            </td>
                            <td class="col-xs-1">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                Total: 4, Pass: 1, Fail: 1, Error: 1, Skip: 1 -- Duration: 0 ms
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $('td').on('click', '.btn', function(e){
                e.preventDefault();
                e.stopImmediatePropagation();
                var $this = $(this);
                var $nextRow = $this.closest('tr').next('tr');
                $nextRow.slideToggle("fast");
                $this.text(function(i, text){
                    if (text === 'View') {
                        return 'Hide';
                    } else {
                        return 'View';
                    };
                });
            });
        });
    </script>
</body>
</html